package com.ruoyi.yuyuan;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import javax.annotation.PostConstruct;

@EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.ruoyi.yuyuan.Mapper")
@SpringBootApplication
public class YuYuanApplication {
    @PostConstruct
    public void init() {
        // 解决netty冲突问题
        // redis -> netty; es -> netty 当redis启动后es会检查netty，发现已设置则会不启动，因此报错
        System.setProperty("es.set.netty.runtime.available.processors", "false");
    }
    public static void main(String[] args) {
        SpringApplication.run(YuYuanApplication.class, args);
    }

}
